Imports StartPoint.BR.Interfaces
Imports StartFrame.BR.Interfaces

Namespace Listados

    Public Class Valores
        Inherits StartFrame.US.Listador

        Dim _Valores As ICheques

#Region " Windows Form Designer generated code "

        Public Sub New()
            MyBase.New()

            'This call is required by the Windows Form Designer.
            InitializeComponent()

            'Add any initialization after the InitializeComponent() call

        End Sub

        'Form overrides dispose to clean up the component list.
        Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
            If disposing Then
                If Not (components Is Nothing) Then
                    components.Dispose()
                End If
            End If
            MyBase.Dispose(disposing)
        End Sub

        'Required by the Windows Form Designer
        Private components As System.ComponentModel.IContainer

        'NOTE: The following procedure is required by the Windows Form Designer
        'It can be modified using the Windows Form Designer.  
        'Do not modify it using the code editor.
        Friend WithEvents fe_devengamiento As LnkDesdeHastaFecha
        Friend WithEvents tp_chedoctc As LnkDesdeHastaFK
        Friend WithEvents cd_banco As LnkDesdeHastaFK
        Friend WithEvents cd_transaccion As LnkDesdeHastaFK
        Friend WithEvents cd_estado_trans As LnkDesdeHastaFK
        Friend WithEvents cd_proveedor As LnkDesdeHastaFK
        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
            Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Valores))
            Me.tp_chedoctc = New LnkDesdeHastaFK
            Me.cd_banco = New LnkDesdeHastaFK
            Me.fe_devengamiento = New LnkDesdeHastaFecha
            Me.cd_proveedor = New LnkDesdeHastaFK
            Me.cd_transaccion = New LnkDesdeHastaFK
            Me.cd_estado_trans = New LnkDesdeHastaFK
            Me.Contenedor.SuspendLayout()
            CType(Me.lnk_dataSet, System.ComponentModel.ISupportInitialize).BeginInit()
            '
            'StatusBar1
            '

            '
            'cboReporte
            '
            Me.cboReporte.Name = "cboReporte"
            Me.cboReporte.Size = New System.Drawing.Size(250, 21)
            Me.cboReporte.ValueMember = "ID"
            '
            'lblReporte
            '
            Me.lblReporte.Name = "lblReporte"
            '
            'lblTitulo
            '
            Me.lblTitulo.Name = "lblTitulo"
            Me.lblTitulo.Text = "Valores Propios"
            '
            'cmdMinimizar
            '
            Me.cmdMinimizar.Image = CType(resources.GetObject("cmdMinimizar.Image"), System.Drawing.Image)
            Me.cmdMinimizar.Name = "cmdMinimizar"
            '
            'TabPage1
            '
            Me.TabPage1.Name = "TabPage1"
            '
            'Contenedor
            '
            Me.Contenedor.Controls.Add(Me.cd_estado_trans)
            Me.Contenedor.Controls.Add(Me.cd_transaccion)
            Me.Contenedor.Controls.Add(Me.cd_proveedor)
            Me.Contenedor.Controls.Add(Me.fe_devengamiento)
            Me.Contenedor.Controls.Add(Me.cd_banco)
            Me.Contenedor.Controls.Add(Me.tp_chedoctc)
            Me.Contenedor.Name = "Contenedor"
            '
            'tp_chedoctc
            '
            Me.tp_chedoctc.BackColor = System.Drawing.SystemColors.ControlLight
            Me.tp_chedoctc.Desde = ""
            Me.tp_chedoctc.Hasta = "ZZZZZZZZ"
            Me.tp_chedoctc.Location = New System.Drawing.Point(152, 32)
            Me.tp_chedoctc.LvCampo = "tp_chedoctc"
            Me.tp_chedoctc.LvTabla = "cad_tipo_documentos"
            Me.tp_chedoctc.LvWhere = Nothing
            Me.tp_chedoctc.Name = "tp_chedoctc"
            Me.tp_chedoctc.Size = New System.Drawing.Size(248, 20)
            Me.tp_chedoctc.TabIndex = 1
            Me.tp_chedoctc.Valida = False
            '
            'cd_banco
            '
            Me.cd_banco.BackColor = System.Drawing.SystemColors.ControlLight
            Me.cd_banco.Desde = ""
            Me.cd_banco.Hasta = "ZZZZZZZZ"
            Me.cd_banco.Location = New System.Drawing.Point(152, 56)
            Me.cd_banco.LvCampo = "cd_banco"
            Me.cd_banco.LvTabla = "ccd_bancos"
            Me.cd_banco.LvWhere = Nothing
            Me.cd_banco.Name = "cd_banco"
            Me.cd_banco.Size = New System.Drawing.Size(248, 20)
            Me.cd_banco.TabIndex = 3
            Me.cd_banco.Valida = False
            '
            'fe_devengamiento
            '
            Me.fe_devengamiento.BackColor = System.Drawing.SystemColors.ControlLight
            Me.fe_devengamiento.Desde = New Date(2005, 3, 1, 16, 21, 22, 884)
            Me.fe_devengamiento.Hasta = New Date(2005, 3, 1, 16, 58, 27, 343)
            Me.fe_devengamiento.Location = New System.Drawing.Point(152, 8)
            Me.fe_devengamiento.Name = "fe_devengamiento"
            Me.fe_devengamiento.Size = New System.Drawing.Size(176, 20)
            Me.fe_devengamiento.TabIndex = 4
            '
            'cd_proveedor
            '
            Me.cd_proveedor.BackColor = System.Drawing.SystemColors.ControlLight
            Me.cd_proveedor.Desde = ""
            Me.cd_proveedor.Hasta = "zzzzzzzzzz"
            Me.cd_proveedor.Location = New System.Drawing.Point(152, 80)
            Me.cd_proveedor.LvCampo = "cd_proveedor"
            Me.cd_proveedor.LvTabla = "kad_proveedores"
            Me.cd_proveedor.LvWhere = Nothing
            Me.cd_proveedor.Name = "cd_proveedor"
            Me.cd_proveedor.Size = New System.Drawing.Size(248, 20)
            Me.cd_proveedor.TabIndex = 5
            Me.cd_proveedor.Valida = False
            '
            'cd_transaccion
            '
            Me.cd_transaccion.BackColor = System.Drawing.SystemColors.ControlLight
            Me.cd_transaccion.Desde = ""
            Me.cd_transaccion.Hasta = "zzzzzzzzzz"
            Me.cd_transaccion.Location = New System.Drawing.Point(152, 104)
            Me.cd_transaccion.LvCampo = "cd_transaccion"
            Me.cd_transaccion.LvTabla = "wad_transaccciones"
            Me.cd_transaccion.LvWhere = Nothing
            Me.cd_transaccion.Name = "cd_transaccion"
            Me.cd_transaccion.Size = New System.Drawing.Size(248, 20)
            Me.cd_transaccion.TabIndex = 7
            Me.cd_transaccion.Valida = False
            '
            'cd_estado_trans
            '
            Me.cd_estado_trans.BackColor = System.Drawing.SystemColors.ControlLight
            Me.cd_estado_trans.Desde = ""
            Me.cd_estado_trans.Hasta = "zzzzzzzzzz"
            Me.cd_estado_trans.Location = New System.Drawing.Point(152, 128)
            Me.cd_estado_trans.LvCampo = "cd_estado_trans"
            Me.cd_estado_trans.LvTabla = "wld_estados_transac"
            Me.cd_estado_trans.LvWhere = Nothing
            Me.cd_estado_trans.Name = "cd_estado_trans"
            Me.cd_estado_trans.Size = New System.Drawing.Size(248, 20)
            Me.cd_estado_trans.TabIndex = 8
            Me.cd_estado_trans.Valida = False
            '
            'Valores
            '
            Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
            Me.BackgroundImage = CType(resources.GetObject("$this.BackgroundImage"), System.Drawing.Image)
            Me.ClientSize = New System.Drawing.Size(564, 384)
            Me.Name = "Valores"
            Me.Contenedor.ResumeLayout(False)
            CType(Me.lnk_dataSet, System.ComponentModel.ISupportInitialize).EndInit()

        End Sub

#End Region

        'Este evento se dispara al cargar el formulario
        Private Sub Valores_OnLoadForm(ByRef reportCollection As StartFrame.US.Listador.Reports) Handles MyBase.OnLoadForm

            Try

                'Agrega los reportes
                Dim rpt As Report
                Dim rangoFe_devengamiento As New Rango(1, "fe_devengamiento", fe_devengamiento)
                Dim rangoTp_chedoctc As New Rango(2, "tp_chedoctc", tp_chedoctc)
                Dim rangoCd_banco As New Rango(3, "cd_banco", cd_banco)
                Dim rangoCd_proveedor As New Rango(4, "cd_proveedor", cd_proveedor)
                Dim rangoCd_transaccion As New Rango(5, "cd_transaccion", cd_transaccion)
                Dim rangoCd_estado_trans As New Rango(6, "cd_estado_trans", cd_estado_trans)

                'MPM 21-06-2005
                Me.fe_devengamiento.Desde = Now.ToShortDateString
                Me.fe_devengamiento.Hasta = Now.ToShortDateString

                'Por Vencimiento
                rpt = New Report(1, "clvalores_vencimiento", "Por Vencimiento", "clvalores_vencimiento", "US.spmc.tesoreria.reportes")
                rpt.Rangos.Add(rangoFe_devengamiento)
                rpt.Rangos.Add(rangoTp_chedoctc)
                rpt.Rangos.Add(rangoCd_banco)
                rpt.Rangos.Add(rangoCd_proveedor)
                reportCollection.Add(rpt)

                'Por Banco
                rpt = New Report(2, "clvalores_banco", "Por Banco", "clvalores_banco", "US.spmc.tesoreria.reportes")
                rpt.Rangos.Add(rangoFe_devengamiento)
                rpt.Rangos.Add(rangoTp_chedoctc)
                rpt.Rangos.Add(rangoCd_banco)
                rpt.Rangos.Add(rangoCd_proveedor)
                reportCollection.Add(rpt)

                'Movimientos
                rpt = New Report(3, "clvalores_movimientos", "Movimientos", "clvalores_movimientos", "US.spmc.tesoreria.reportes")
                rpt.Rangos.Add(rangoFe_devengamiento)
                rpt.Rangos.Add(rangoTp_chedoctc)
                rpt.Rangos.Add(rangoCd_banco)
                rpt.Rangos.Add(rangoCd_proveedor)
                rpt.Rangos.Add(rangoCd_transaccion)
                rpt.Rangos.Add(rangoCd_estado_trans)
                reportCollection.Add(rpt)

                'Referencia el objeto de negocios relacionado
                _Valores = CType(RemotingHelper.getObject(GetType(ICheques)), ICheques)
                Me.ObjetoReglasNegocio = _Valores

            Catch ex As Exception
                StartFrame.US.Display.ShowError(ex.Message)

            End Try

        End Sub

    End Class

End Namespace